<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    body {
        perspective: 500px;
    }

    .box {
        width: 300px;
        height: 300px;
        position: relative;
        margin: 100px auto;
        text-align: center;
        transform-style: preserve-3d;
        transition: all .5s;
        border: 1px solid #000;
    }

    .box:hover {
        transform: rotateY(180deg);
    }

    .box .front,
    .box .back {
        width: 100%;
        height: 100;
        top: 0;
        left: 0;
        border-radius: 50%;
        background-color: darkcyan;
        position: absolute;
        line-height: 300px;

    }

    .box .back {
        background-color: darkmagenta;
        transform: rotateY(180deg);
        transition: all .5s;

    }
</style>

<body>
    <div class="box">
        <div class="back">后面的</div>

        <div class="front">前面的</div>
    </div>
</body>

</html>